﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Benefit.Service.ServerData
{
    /// <summary>
    /// 合约表
    /// </summary>
    public class ServiceT_Instrument : Benefit.Interface.ServerData.IT_Instrument
    {
        Benefit.DB.DBManager db = null;
        public ServiceT_Instrument(Benefit.DB.DBManager db)
        {
            this.db = db;
        }


        /// <summary>
        /// 获取所有合约
        /// </summary>
        /// <returns></returns>
        public List<Models.ServerData.T_Instrument> GetList()
        {
            DavidDB.ADO.DBManager dbmanager = new DavidDB.ADO.DBManager();
            List<Models.ServerData.T_Instrument> instruments = new List<Models.ServerData.T_Instrument>();
            List<object> objs = dbmanager.GetList(new Models.ServerData.T_Instrument());
            foreach (Models.ServerData.T_Instrument p in objs)
            {
                instruments.Add(p);
            }
            dbmanager.Commit();
            dbmanager.Dispose();
            return instruments;
        }
    }
}